# -*- coding: utf-8 -*-

import BBS as bbs

uid = 9
authcode = "a0a705015409e13a6bcae473c84b9cd9"

"""
s, pid = bbs.post(
    uid, authcode,
    "测试1", "这是一个测试帖")

s, rid = bbs.reply(
    uid, authcode,
    pid, "回帖测试"
)

s, rrid = bbs.reply_to_reply(
    uid, authcode,
    4, "楼中楼测试"
)

print(bbs.set_admin(
    uid, authcode,
    13
))

print(bbs.is_admin(9))

print(bbs.cancel_mark(uid, authcode, 10))
"""

with bbs.mysql(db="typecho") as cur:
    cur.execute(
        """
        SELECT COUNT(*)
        FROM typecho_users;
        """)
    print(cur.fetchone())